declare const x: boolean | null; if (x) {}

<T extends boolean | null | undefined>(x: T) => x ? 1 : 0;

// output: declare const x: boolean | null; if (x ?? false) {}; declare const x: boolean | null; if (x === true) {}
// output: (x?: boolean) => !(x ?? false); (x?: boolean) => x === false;
// output:<T extends boolean | null | undefined>(x: T) => (x ?? false) ? 1 : 0; <T extends boolean | null | undefined>(x: T) => (x === true) ? 1 : 0;
